﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;

namespace Mabalacat.CPS.DataAccess.DataObjects
{
    public class Employee : EntityBase<int>
    {
                 
        #region Personal Details
        [Required]
        [StringLength(20)]
        public string EmployeeCode { get; set; }
        
        [Required]
        [StringLength(50)]
        public string FirstName { get; set; }
        
        [StringLength(50)]
        public string MiddleName { get; set; }

        [Required]
        [StringLength(50)]
        public string LastName { get; set; }

        private string _gender;
        [StringLength(10)]
        public string Gender 
        {
            get { return _gender != null ? _gender.ToUpper() : string.Empty; }
            set { _gender = value; } 
        }

        private string _civilStatus;
        [StringLength(50)]
        public string CivilStatus
        {
            get { return _civilStatus != null ? _civilStatus.ToUpper() : string.Empty; }
            set { _civilStatus = value; }
        }

        [StringLength(50)]
        public string ContactNo { get; set; }

        [StringLength(200)]
        public string Address { get; set; }

        [StringLength(200)]
        public string Remarks { get; set; }
        
        #endregion

        #region Account
        
        [StringLength(50)]
        public string TaxIDNo { get; set; }
        [StringLength(50)]
        public string GSISPolicyNo { get; set; }
        [StringLength(50)]
        public string GSISCardNo { get; set; }
        [StringLength(50)]
        public string PagIbigIDNo { get; set; }
        [StringLength(50)]
        public string PhilHealthIDNo { get; set; }
        [StringLength(10)]
        public string SalaryGrade { get; set; }
        [StringLength(10)]
        public string SalaryStep { get; set; }   

        #endregion
        

        public DateTime? DateAdded { get; set; }
        public DateTime? DateModified { get; set; }
        public DateTime? DateOfBirth { get; set; }

        #region Constructor        

        #endregion

        #region Relation        
        public int? PositionId { get; set; }
        public int? DivisionId { get; set; }
        public virtual Position Position { get; set; }
        public virtual Division Division { get; set; }
        #endregion

        #region Methods
        public void SetStatus(int status)
        {

        }
        #endregion

    }
}
